cmake_minimum_required(VERSION 3.0)
project(bin2c C)

add_executable(bin2c src/bin2c.c )

if(USE_BZ2)
        find_package(BZip2 REQUIRED)
        target_compile_definitions(bin2c PRIVATE USE_BZ2)
        target_link_libraries(bin2c BZip2::BZip2)
endif()

install(TARGETS bin2c DESTINATION "."
        RUNTIME DESTINATION bin
        ARCHIVE DESTINATION lib
        LIBRARY DESTINATION lib
        )
